<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>轮播图</title>
    <script src="../js/jquery-3.4.1.min.js"></script>
    <script>
        $().ready(function () {
            var i = 0;
            setInterval(function () {
                // var img = document.getElementById("lunBo").firstElementChild;
                var a = new Array();
                a[0] = "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1595938896885&di=c26da494ec1ac00ed413a9f624276ebd&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181026%2F1b979f42fdb04e9bb572535c4e006bab.jpeg";
                a[1] = "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1595938899399&di=f27eafef4074eb2d885324b735953567&imgtype=0&src=http%3A%2F%2Fww1.sinaimg.cn%2Forj480%2F82c654dfjw1f3rkml6fldj20af08k752.jpg";
                a[2] = "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1595938917569&di=e1e03d2e4d66f05e34f51d0bdcd7c9c2&imgtype=0&src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_bt%2F0%2F8374061045%2F640";
                a[3] = "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3283905578,1111889658&fm=26&gp=0.jpg";
                a[4] = "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1891508764,4054589572&fm=26&gp=0.jpg";

                //img.setAttribute("src", a[i]);
                $("#lunBo img").prop("src", a[i]);
                i++;
                if (i > 4) {
                    i = 0;
                }
            }, 1500)
        });
    </script>
</head>
<body>
<div id="lunBo" style="text-align: center">
    <img
         src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1595938896885&di=c26da494ec1ac00ed413a9f624276ebd&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181026%2F1b979f42fdb04e9bb572535c4e006bab.jpeg">


</div>
</body>
</html>